package com.smart.car.points.service.impl;

import com.alibaba.fastjson.JSONObject;
import com.smart.car.points.entity.PointsSign;
import com.smart.car.points.mapper.PointsSignMapper;
import com.smart.car.points.service.PointsInfoService;
import com.smart.car.points.service.PointsSignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * TODO
 *
 * @author zoutao.blog.csdn.net
 * @date 2021/3/11
 */
@Slf4j
@Service
public class PointsSignServiceImpl implements PointsSignService{

    @Autowired
    private PointsSignMapper signMapper;

    @Override
    public int sign(String json) {
        PointsSign sign = JSONObject.parseObject(json, PointsSign.class);
        log.debug("签到开始了！");
        return signMapper.insertSelective(sign);
    }
}


